﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfSeguros.aspx.cs" Inherits="webSGA.wfSeguros" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Pólizas de Seguro - Sistema de Gestión Administrativa</title>
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/docs.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/js/google-code-prettify/prettify.css" rel="stylesheet" type="text/css" />
    <link href="bootstrap/css/datepicker.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="bootstrap/ico/favicon.ico" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="bootstrap/ico/apple-touch-icon-144-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="bootstrap/ico/apple-touch-icon-114-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="bootstrap/ico/apple-touch-icon-72-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" href="bootstrap/ico/apple-touch-icon-57-precomposed.png" />
</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar" onkeydown = "return (event.keyCode!=13)">
    <form id="form1" runat="server" class="form-horizontal">
    <asp:ScriptManager ID="Scriptmanager1" runat="server">
    </asp:ScriptManager>
    <!--Cabecera-->
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid">
                <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar">
                    </span>
                </button>
                <a class="brand" href="Default.aspx">Sistema de Gestión Administrativa</a>
                <div class="nav-collapse collapse">
                    <p class="navbar-text pull-right">
                        Conectado como
                        <asp:Label ID="lblUsuario" runat="server" Text=""></asp:Label>
                        &nbsp; | &nbsp;
                        <asp:Button ID="btnCerrarSesion" runat="server" Text="Cerrar Sesión" CssClass="btn-link"
                            OnClick="btnCerrarSesion_Click" />
                    </p>
                    <ul class="nav">
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Locales
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Locales</li>
                                <li><a href="wfLocal.aspx">Mantenimiento de Locales</a></li>
                                <li><a href="wfImplementarLocal.aspx">Implementación de Locales</a></li>
                                <li class="divider"></li>
                                <li class="nav-header">Servicios</li>
                                <li><a href="#">Tipos de Servicios</a></li>
                                <li><a href="wfReciboServicio.aspx">Recibos de Servicios</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Empleados
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Vehículos</li>
                                <li><a href="wfVehiculo.aspx">Mantenimiento de Vehículos</a></li>
                                <li><a href="wfHojaRuta.aspx">Hoja de Ruta</a></li>
                                <li class="divider"></li>
                                <li class="nav-header">Servicios</li>
                                <li><a href="wfSolicitudTaxi.aspx">Solicitud de Taxi</a></li>
                                <li><a href="#">Solicitud de Viaje</a></li>
                                <li><a href="#">Solicitud de Útiles de Oficina</a></li>
                                <li><a href="#">Solicitud de Útiles de Tarjetas Personales</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Telefonía
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="nav-header">Solicitud</li>
                                <li><a href="wfSolicitudTelefonia.aspx">Solicitud de Equipo Telefónico</a></li>
                                <li><a href="wfReposicionTelefonia.aspx">Reposición de Equipo Teléfonico</a></li>
                                <li class="divider"></li>
                                <li><a href="wfEntregaEquipoTelefonico.aspx">Entrega de Equipo Telefónico</a></li>
                            </ul>
                        </li>
                        <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Seguros
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="active"><a href="wfSeguros.aspx">Pólizas de Seguro</a></li>
                            </ul>
                        </li>
                        <li><a href="#">Reportes</a></li>
                        <li><a href="#">Seguridad</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--Cuerpo-->
    <div class="container">
        <div class="row">
            <div class="span3 bs-docs-sidebar">
                <ul class="nav nav-list bs-docs-sidenav">
                    <li><a href="#datos-principales"><i class="icon-chevron-right"></i>Datos Principales</a></li>
                    <li><a href="#cobertura"><i class="icon-chevron-right"></i>Cobertura</a></li>
                    <li><a href="#bienes"><i class="icon-chevron-right"></i>Bienes Asegurados</a></li>
                </ul>
            </div>
            <div class="span9">
                <br />
                <asp:UpdatePanel ID="UpdatePanel2" runat="server" ClientIDMode="Static" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div class="alert alert-success" id="alertaExito" runat="server" visible="False">
                            <button type="button" class="close" data-dismiss="alert">
                                &times;</button>
                            <asp:Label ID="lblExito" runat="server"></asp:Label>
                        </div>
                        <div class="alert alert-error" id="alertaError" runat="server" visible="False">
                            <button type="button" class="close" data-dismiss="alert">
                                &times;</button>
                            <asp:Label ID="lblError" runat="server"></asp:Label>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <br />
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="btn-group">
                            <asp:Button ID="btnNuevo" runat="server" Text="Nuevo" class="btn" OnClick="btnNuevo_Click" />
                            <asp:Button ID="btnGrabar" CssClass="btn btn-primary" runat="server" Text="Grabar"
                                OnClick="btnGrabar_Click" />
                            <asp:Button ID="btnEditar" CssClass="btn" runat="server" Text="Editar" OnClick="btnEditar_Click" /><asp:HiddenField
                                ID="hfAccion" runat="server" />
                            <asp:Button ID="btnCancelar" CssClass="btn" runat="server" Text="Cancelar" OnClick="btnCancelar_Click" />
                        </div>
                        <hr />
                        <h2 id="datos-principales">
                            Datos Principales</h2>
                        <div class="control-group span8">
                            <label class="control-label" for="txtPoliza">
                                Nro. de Póliza</label>
                            <div class="controls">
                                <asp:TextBox ID="txtPoliza" CssClass="input-medium" runat="server" MaxLength="20"></asp:TextBox>
                                <asp:LinkButton ID="btnBuscarPoliza" runat="server" CssClass="btn" OnClick="btnBuscarPoliza_Click"><i class="icon-search"></i></asp:LinkButton>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtProveedor">
                                Proveedor</label>
                            <div class="controls">
                                <asp:TextBox ID="txtProveedor" CssClass="input-medium uneditable-input" Enabled="False"
                                    runat="server"></asp:TextBox>
                                <asp:LinkButton ID="btnBuscarProveedor" runat="server" CssClass="btn" OnClick="btnBuscarProveedor_Click"><i class="icon-search"></i></asp:LinkButton>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtRazonSocial">
                                Descripción</label>
                            <div class="controls">
                                <asp:TextBox ID="txtRazonSocial" CssClass="input-xxlarge uneditable-input" Enabled="False"
                                    runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="cboTipoPoliza">
                                Tipo de Póliza</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboTipoPoliza" CssClass="dropdown input-xlarge" AutoPostBack="True"
                                    runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtAsegurado">
                                Asegurado</label>
                            <div class="controls">
                                <asp:TextBox ID="txtAsegurado" CssClass="input-xxlarge" runat="server" MaxLength="100"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtDescripcion">
                                Descripción</label>
                            <div class="controls">
                                <asp:TextBox ID="txtDescripcion" CssClass="input-xxlarge" runat="server" MaxLength="100"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span8">
                            <label class="control-label" for="txtCobertura">
                                Cobertura</label>
                            <div class="controls">
                                <asp:TextBox ID="txtCobertura" CssClass="input-xxlarge" runat="server" MaxLength="100"></asp:TextBox>
                            </div>
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <hr />
                        <h2 id="cobertura">
                            Cobertura</h2>
                        <div class="control-group span4">
                            <label class="control-label" for="txtFechaInicioVigencia">
                                Inicio Vigencia</label>
                            <div class="controls">
                                <div class="input-append date">
                                    <asp:TextBox ID="txtFechaInicioVigencia" runat="server" CssClass="input-small" data-date-format="dd/mm/yyyy"
                                        MaxLength="10"></asp:TextBox>
                                    <span class="add-on"><i class="icon-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtFechaFinVigencia">
                                Fin Vigencia</label>
                            <div class="controls">
                                <div class="input-append date">
                                    <asp:TextBox ID="txtFechaFinVigencia" runat="server" CssClass="input-small" data-date-format="dd/mm/yyyy"
                                        MaxLength="10"></asp:TextBox>
                                    <span class="add-on"><i class="icon-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="txtMontoAsegurado">
                                Monto Asegurado</label>
                            <div class="controls">
                                <asp:TextBox ID="txtMontoAsegurado" CssClass="input-medium" MaxLength="10" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="control-group span4">
                            <label class="control-label" for="cboMoneda">
                                Moneda</label>
                            <div class="controls">
                                <asp:DropDownList ID="cboMoneda" CssClass="dropdown input-large" AutoPostBack="True"
                                    runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <hr />
                        <h2 id="bienes">
                            Bienes Asegurados</h2>
                        <div class="control-group span8">
                            <asp:LinkButton ID="btnAgregarBien" runat="server" CssClass="btn" OnClick="btnAgregarBien_Click"><i class="icon-plus-sign"></i></asp:LinkButton>
                            <asp:LinkButton ID="btnQuitarBien" runat="server" CssClass="btn" OnClick="btnQuitarBien_Click"><i class="icon-minus-sign"></i></asp:LinkButton>
                        </div>
                        <asp:GridView ID="gvBienes" runat="server" CssClass="table table-striped table-bordered table-condensed"
                            AutoGenerateColumns="False" OnRowCancelingEdit="gvBienes_RowCancelingEdit" OnRowDataBound="gvBienes_RowDataBound"
                            OnRowEditing="gvBienes_RowEditing" OnRowUpdating="gvBienes_RowUpdating">
                            <Columns>
                                <asp:CommandField ShowEditButton="True">
                                    <ItemStyle Width="20px" />
                                </asp:CommandField>
                                <asp:TemplateField HeaderText="." HeaderStyle-Width="10px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblItemG" runat="server" Text='<%#Eval("Item") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tipo Bien" HeaderStyle-Width="30px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTipoBienG" runat="server" Text='<%#Eval("TipoBienAsegurado.Descripcion") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="cboTipoBienG" CssClass="dropdown" DataTextField="Descripcion"
                                            DataValueField="IdTipoBienAsegurado" runat="server">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Descripcion" HeaderStyle-Width="20px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDescripcionG" runat="server" Text='<%#Eval("Descripcion") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDescripcionG" CssClass="input-medium" Text='<%#Eval("Descripcion") %>'
                                            MaxLength="100" runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Fecha Inclusión" HeaderStyle-Width="20px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblFechaInclusionG" runat="server" Text='<%#Eval("FechaInclusion","{0:dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtFechaInclusionG" CssClass="input-small text-right" data-date-format="dd/mm/yyyy"
                                            MaxLength="10" Text='<%#Eval("FechaInclusion") %>' runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Valor" HeaderStyle-Width="40px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblValorG" runat="server" Text='<%#Eval("ValorBien") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtValorG" CssClass="input-small" Text='<%#Eval("ValorBien") %>'
                                            MaxLength="10" runat="server"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <!--Modal Confirmación de Grabar-->
            <fieldset>
                <div id="modalConfirmacion" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="mlblConfirmacion"
                    aria-hidden="true">
                    <div class="modal-header">
                        <h3 id="mlblConfirmacion">
                            Guardar cambios de la póliza de seguros</h3>
                    </div>
                    <div class="modal-body">
                        <p>
                            ¿Está seguro de guardar los cambios en la póliza de seguros?
                        </p>
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="btnSiGrabar" runat="server" Text="Si" CssClass="btn btn-primary"
                            OnClick="btnSiGrabar_Click" />
                        <input id="btnNoGrabar" class="btn" type="button" data-dismiss="modal" value="No" />
                    </div>
                </div>
            </fieldset>
            <!--Modal Búsqueda de Póliza-->
            <fieldset>
                <div id="modalBusquedaPoliza" class="modal hide fade" tabindex="-1" role="dialog"
                    aria-labelledby="mlblBusquedaProveedor" aria-hidden="true">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;</button>
                        <h3 id="H2">
                            Búsqueda de Pólizas de Seguro</h3>
                    </div>
                    <div class="modal-body">
                        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                            <ContentTemplate>
                                <div class="control-group">
                                    <label class="control-label" for="txtPolizaC">
                                        Nro. Póliza</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtPolizaC" CssClass="input-medium" runat="server" MaxLength="20"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="cboTipoPolizaC">
                                        Tipo de Póliza</label>
                                    <div class="controls">
                                        <asp:DropDownList ID="cboTipoPolizaC" CssClass="dropdown input-large" AutoPostBack="True"
                                            runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="txtRucProveedorCP">
                                        RUC Proveedor</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtRucProveedorCP" CssClass="input-medium" runat="server" MaxLength="20"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group span2">
                                    <label class="control-label">
                                        Inicio Vigencia Desde</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtFechaInicioDesde" CssClass="input-small" runat="server" data-date-format="dd/mm/yyyy"
                                            MaxLength="10"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group span2">
                                    <label class="control-label">
                                        Hasta</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtFechaInicioHasta" CssClass="input-small" runat="server" data-date-format="dd/mm/yyyy"
                                            MaxLength="10"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group span2">
                                    <label class="control-label">
                                        Fin Vigencia Desde</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtFechaFinDesde" CssClass="input-small" runat="server" data-date-format="dd/mm/yyyy"
                                            MaxLength="10"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group span2">
                                    <label class="control-label">
                                        Hasta</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtFechaFinHasta" CssClass="input-small" runat="server" data-date-format="dd/mm/yyyy"
                                            MaxLength="10"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group span5">
                                    <div class="controls">
                                        <asp:Button ID="btnConsultarPoliza" CssClass="btn btn-info" runat="server" Text="Consultar"
                                            OnClick="btnConsultarPoliza_Click" />
                                    </div>
                                </div>
                                <br />
                                <asp:GridView ID="gvConsultaPoliza" CssClass="table table-striped table-bordered table-condensed"
                                    runat="server" AutoGenerateColumns="False" DataKeyNames="NroPoliza,RucProveedor,IdTipoSeguro"
                                    OnRowCommand="gvConsultaPoliza_RowCommand">
                                    <Columns>
                                        <asp:ButtonField CommandName="Seleccionar" ButtonType="Button" Text="Sel." ControlStyle-CssClass="btn btn-small btn-link" />
                                        <asp:BoundField DataField="NroPoliza" HeaderText="Póliza" ReadOnly="True" />
                                        <asp:TemplateField HeaderText="Proveedor">
                                            <ItemTemplate>
                                                <asp:Label ID="lblProveedor" Text='<%# Eval("Proveedor.RazonSocial") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tipo Seguro">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTipoSeguro" Text='<%# Eval("TipoSeguro.Descripcion") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                            <Triggers>
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </fieldset>
            <!--Modal Búsqueda de Proveedor-->
            <fieldset>
                <div id="modalBusquedaProveedor" class="modal hide fade" tabindex="-1" role="dialog"
                    aria-labelledby="mlblBusquedaProveedor" aria-hidden="true">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;</button>
                        <h3 id="H1">
                            Búsqueda de Proveedor</h3>
                    </div>
                    <div class="modal-body">
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
                                <div class="control-group">
                                    <label class="control-label" for="txtRucProveedorC">
                                        RUC</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtRucProveedorC" CssClass="input-medium" runat="server" MaxLength="20"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="txtRazonSocialC">
                                        Razón Social</label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtRazonSocialC" CssClass="input-medium" runat="server" MaxLength="50"></asp:TextBox>
                                        <asp:Button ID="btnConsultarProveedor" CssClass="btn btn-info" runat="server" Text="Consultar"
                                            OnClick="btnConsultarProveedor_Click" />
                                    </div>
                                </div>
                                <br />
                                <asp:GridView ID="gvConsultaProveedor" CssClass="table table-striped table-bordered table-condensed"
                                    runat="server" AutoGenerateColumns="False" DataKeyNames="RucProveedor" OnRowCommand="gvConsultaProveedor_RowCommand">
                                    <Columns>
                                        <asp:ButtonField CommandName="Seleccionar" ButtonType="Button" Text="Sel." ControlStyle-CssClass="btn btn-small btn-link" />
                                        <asp:BoundField DataField="RucProveedor" HeaderText="RUC" ReadOnly="True" />
                                        <asp:BoundField DataField="RazonSocial" HeaderText="Razón Social" ReadOnly="True" />
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gvConsultaProveedor" EventName="RowCommand" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </fieldset>
            <hr />
            <footer>
                    <p class="muted credit">
                Peruana de Combustibles S.A. - 2013</p>
      </footer>
        </div>
    </div>
    </form>
    <script src="bootstrap/js/google-code-prettify/prettify.js" type="text/javascript"></script>
    <script src="bootstrap/js/jquery.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-dropdown.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-affix.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-alert.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-button.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-carousel.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-collapse.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-modal.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-popover.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-scrollspy.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-tab.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-tooltip.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-transition.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-typeahead.js" type="text/javascript"></script>
    <script src="bootstrap/js/html5shiv.js" type="text/javascript"></script>
    <script src="bootstrap/js/holder/holder.js" type="text/javascript"></script>
    <script src="bootstrap/js/application.js" type="text/javascript"></script>
    <script src="bootstrap/js/bootstrap-datepicker.js" type="text/javascript"></script>
    <script>
        function pageLoad() {
            $(function () {
                window.prettyPrint && prettyPrint();
                $('#txtFechaInicioVigencia').datepicker();
                $('#txtFechaFinVigencia').datepicker();

                $('#txtFechaInicioDesde').datepicker();
                $('#txtFechaInicioHasta').datepicker();
                $('#txtFechaFinDesde').datepicker();
                $('#txtFechaFinHasta').datepicker();
            });
        }

        function ToTopOfPage(sender, args) {
            setTimeout("window.scrollTo(0, 0)", 0);
        }
    </script>
    <script type="text/javascript">
        // if you use jQuery, you can load them when dom is read.
        $(document).ready(function () {
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            prm.add_initializeRequest(InitializeRequest);
            prm.add_endRequest(EndRequest);

            // Place here the first init of the DatePicker
            $(".text-right").datepicker();
        });

        function InitializeRequest(sender, args) {
            // make unbind to avoid memory leaks.
            $(".text-right").unbind();
        }

        function EndRequest(sender, args) {
            // after update occur on UpdatePanel re-init the DatePicker
            $(".text-right").datepicker();
        }
    </script>
</body>
</html>
